﻿using CRM.Services;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using System.Net.Http;
using Microsoft.Extensions.Logging;
namespace CRM.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class LoggingInfoController : BaseController
    {
        private readonly MyDbContext _dbContext;
        private readonly LoggingInfoService _service;
        private readonly IHttpClientFactory _httpClientFactory;
        private readonly ILogger<LoggingInfoController> _logger;

        public LoggingInfoController(MyDbContext dbContext, LoggingInfoService service, IHttpClientFactory httpClientFactory, ILogger<LoggingInfoController> logger)
        {
            _dbContext = dbContext;
            _service = service;
            _httpClientFactory = httpClientFactory;
            _logger = logger;
        }

        [HttpGet("[action]")]
        public async Task<ResultStruct> Index()
        {
            return Success(await _service.Index());
        }
    }
}
